<?php

use think\migration\Migrator;
use think\migration\db\Column;

/**
 * Class RoleNode 角色节点多对多关系表
 */
class RoleNode extends Migrator
{
    public function change()
    {
        $table = $this->table('role_node');
        $table->addColumn('role_id', 'integer', ['default'=>0]);
        $table->addColumn('node_id', 'integer', ['default'=>0]);

        $table->insert([
            'role_id' => 1,
            'node_id' => 1,
        ]);

        $table->save();
    }
}
